<%@ page language="java" import="java.util.*" pageEncoding="utf-8" isELIgnored="false" %>
<%@ include file="tag.jsp"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<title>IT园_编程爱好者学习交流的平台</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta name="Keywords"
	content="Java、C、.NET、PHP、C#、JACASCRIPT、JQUERY、大数据、HTML、HTML5、CSS、PYTHON、编程、软件开发">
<meta name="description"
	content="为广大爱好者提供java、C、.NET、PHP、C#、JACASCRIPT、JQUERY、大数据、HTML、HTML5、CSS、PYTHON等语言的交流论坛和各种资源下载">
<%@ include file="common.jsp"%>
<style type="text/css">
.yc-li {
	color: blue;
	background: #6CA7D6;
}
</style>
</head>
<body>
	<div class="yc_container">
		<jsp:include page="top.jsp"></jsp:include>
		<div class="yc_icontent">
			<div class="yc_section_news">
				<div class="leftbar">
					<div class="focus">
						<!--头图轮换-->
						<div class="container">
							<div class="inner clearfix">
								<c:forEach var="news" items="${news}">${news.newsId }
				               		<div class="innerwraper">
										<img src="homeLogo?id=${news.id }" alt="${news.imgName }"
											onclick="javascript:window.location.href='expose/news/newsDetail?id=${news.newsId }'" />
									</div>
								</c:forEach>
							</div>
							<div class="pagination">
								<span class="active">1</span> <span>2</span> <span>3</span> <span>4</span>
								<span>5</span>
							</div>
						</div>
						<!--头图轮换结束-->
					</div>

					<!-- 公告通知begin -->
					<div class="tongzhi">
						<div class="title">
							<img src="images/li.png" class="img">
							<h3 style="text-align: left;">站内通知</h3>
							<a href="expose/notice/list?pageNow=1" class="dq_more">更多>></a>
						</div>
						<div class="content">
							<ul class="list">
								<c:forEach items="${notices}" var="notice">
									<li><a href="expose/notice/detail?id=${notice.id }">${notice.noticeTitle}</a>
										<c:if test="${!empty notice.createDate}">
											<span style="float: right; padding-right: 5px;"><fmt:formatDate
													value="${notice.createDate}" type="both"
													pattern="yyyy-MM-dd" />
											</span>
										</c:if>
										</li>
								</c:forEach>
							</ul>
						</div>
					</div>
					<!-- 公告通知end-->
				</div>

				<div class="minbar">
					<div class="yc_inews_tab fl" id="yc_intab">
						<div id="yc_intag">
							<ul>
								<li class="yc-li" style="cursor: pointer;">最新分享</li>
								<li class="" style="cursor: pointer;">最热评论</li>
								<li class="" style="cursor: pointer;">最热下载</li>
							</ul>
						</div>
						<div id="yc_incont">
							<div class="yc_incont" style="display: block;">
								<ul>
									<c:forEach items="${resourceFiles }" var="resourceFile">
										<li><a
											href="expose/resource/detail?id=${resourceFile.id }">${resourceFile.resourceTitle }</a></li>
									</c:forEach>
								</ul>

							</div>
							<div class="yc_incont" style="display: none;">
								<ul>
									<c:forEach items="${hostCommentFiles }" var="hostCommentFile">
										<li><a
											href="expose/resource/detail?id=${hostCommentFile.id }">${hostCommentFile.resourceTitle }</a></li>
									</c:forEach>
								</ul>
							</div>
							<div class="yc_incont" style="display: none;">
								<ul id="rfile">
								</ul>
							</div>
						</div>
					</div>
				</div>
				<!-- 完整tab切换end -->

				<div class="rigbar">
					<div class="shipin">
						<div class="title">
							<img src="images/li.png" class="img">
							<h3 style="text-align: left;">最新文章</h3>
						</div>
						<div class="content" id="article"></div>
					</div>
					<div class="dingyue">
						<div class="title">
							<h2>邮件订阅</h2>
						</div>
						<span>填写您的邮件地址，订阅更多的精彩内容：</span><br /> <input type="text"
							placeholder="your@email.com" />
						<button name="" class="dybutton">订阅</button>
					</div>
				</div>
			</div>
			<div
				style="height: 35px; background: #6CA7D6; font-size: 16px; font-family: '黑体'; color: #fff; margin-top: 490px;">
				<span style="margin-top: 0px; padding-left: 5px; float: left;">热门资源分类</span>
			</div>
			<div class="meili">
				<div class="leftbar">
					<div class="dqinfo" style="margin-right: 10px; margin-top: 3px;">
						<div class="title">
							<img src="images/li.png" class="img">
							<h3 style="text-align: left;">编程开发</h3>
							<a href="expose/article/articleTypeShowList/1/1"
								class="dq_more">更多>></a>
						</div>
						<div class="content">
							<ul class="list">
								<c:forEach items="${articleWeb}" var="article">
									<c:if test="${article.articleType.category ==1}">
										<li><a target="_blank"
											href="expose/article/detail/${article.articleType.id }">
												<c:choose>
													<c:when test="${fn:length(article.articleTitle) > 26}">${fn:substring(article.articleTitle, 0, 26)}...</c:when>
													<c:otherwise> ${article.articleTitle }</c:otherwise>
												</c:choose>
										</a></li>
									</c:if>
								</c:forEach>
							</ul>
						</div>
					</div>
					<div class="dqinfo" style="margin-top: 3px;">
						<div class="title">
							<img src="images/li.png" class="img">
							<h3 style="text-align: left;">数据库</h3>
							<a href="expose/article/articleTypeShowList/1/2"
								class="dq_more">更多>></a>
						</div>
						<div class="content">
							<ul class="list">
								<c:forEach items="${articleDatabase}" var="article">
									<c:if test="${article.articleType.category ==2}">
										<li><a target="_blank"
											href="expose/article/detail/${article.articleType.id }">
												<c:choose>
													<c:when test="${fn:length(article.articleTitle) > 26}">${fn:substring(article.articleTitle, 0, 26)}......</c:when>
													<c:otherwise> ${article.articleTitle }</c:otherwise>
												</c:choose>
										</a></li>
									</c:if>
								</c:forEach>
							</ul>
						</div>
					</div>
					<div class="dqinfo" style="margin-right: 10px; margin-top: 12px;">
						<div class="title">
							<img src="images/li.png" class="img">
							<h3 style="text-align: left;">前端开发</h3>
							<a href="expose/article/articleTypeShowList/1/3"
								class="dq_more">更多>></a>
						</div>
						<div class="content">
							<ul class="list">
								<c:forEach items="${articleFront}" var="article">
									<c:if test="${article.articleType.category ==3}">
										<li><a target="_blank"
											href="expose/article/detail/${article.articleType.id }">
												<c:choose>
													<c:when test="${fn:length(article.articleTitle) > 26}">${fn:substring(article.articleTitle, 0, 26)}......</c:when>
													<c:otherwise> ${article.articleTitle }</c:otherwise>
												</c:choose>
										</a></li>
									</c:if>
								</c:forEach>
							</ul>
						</div>
					</div>
					<div class="dqinfo" style="margin-top: 12px;">
						<div class="title">
							<img src="images/li.png" class="img">
							<h3 style="text-align: left;">服务器</h3>
							<a href="expose/article/articleTypeShowList/1/4"
								class="dq_more">更多>></a>
						</div>
						<div class="content">
							<ul class="list">
								<c:forEach items="${articleServer}" var="article">
									<c:if test="${article.articleType.category ==4}">
										<li><a target="_blank"
											href="expose/article/detail/${article.articleType.id }">
												<c:choose>
													<c:when test="${fn:length(article.articleTitle) > 26}">${fn:substring(article.articleTitle, 0, 26)}......</c:when>
													<c:otherwise> ${article.articleTitle }</c:otherwise>
												</c:choose>
										</a></li>
									</c:if>
								</c:forEach>
							</ul>
						</div>
					</div>
					<div class="dqinfo" style="margin-right: 10px; margin-top: 12px;">
						<div class="title">
							<img src="images/li.png" class="img">
							<h3 style="text-align: left;">
								<span>云计算</span>
							</h3>
							<a href="expose/article/articleTypeShowList/1/5"
								class="dq_more">更多>></a>
						</div>
						<div class="content">
							<ul class="list">
								<c:forEach items="${articleCloud}" var="article">
									<c:if test="${article.articleType.category ==5}">
										<li><a target="_blank"
											href="expose/article/detail/${article.articleType.id }">
												<c:choose>
													<c:when test="${fn:length(article.articleTitle) > 26}">${fn:substring(article.articleTitle, 0, 26)}......</c:when>
													<c:otherwise> ${article.articleTitle }</c:otherwise>
												</c:choose>
										</a></li>
									</c:if>
								</c:forEach>
							</ul>
						</div>
					</div>
					<div class="dqinfo" style="margin-top: 12px;">
						<div class="title">
							<img src="images/li.png" class="img">
							<h3 style="text-align: left;">大数据</h3>
							<a href="expose/article/articleTypeShowList/1/6"
								class="dq_more">更多>></a>
						</div>
						<div class="content">
							<ul class="list">
								<c:forEach items="${articleHadoop}" var="article">
									<c:if test="${article.articleType.category ==6}">
										<li><a target="_blank"
											href="expose/article/detail/${article.articleType.id }">
												<c:choose>
													<c:when test="${fn:length(article.articleTitle) > 26}">${fn:substring(article.articleTitle, 0, 26)}......</c:when>
													<c:otherwise> ${article.articleTitle }</c:otherwise>
												</c:choose>
										</a></li>
									</c:if>
								</c:forEach>
							</ul>
						</div>
					</div>
				</div>
				<div class="rigbar">
				<!-- 最新动态 -->
					<div class="ztbar mt" style="height: 560px;">
						<ul style="margin-left: 5px;">
							<li
								style="height: 35px; width: 329px; background: #8EC165; border: 1px solid #8EC165;"><h3
									style="text-align: center; color: #FFF; margin-top: 8px; font-weight: bold; font-size: 14px;">最新动态</h3></li>
							<c:forEach items="${moments}" var="moment">
								<li style="height: 58px; margin-bottom: 4px;">
									<div
										style="width: 100%; height: 15px; margin-left: 5px; margin-bottom: 5px; color: #00BC3E;">
										${moment.user.chName }<span
											style="float: right; margin-left: -15px; color: #ABABAB;"><script
												type="text/javascript">var date = "${moment.createDate }";document.write(formatDateStyle(date));</script></span>
									</div>
									<div
										style="width: 100%; height: 15px; margin-left: 5px; margin-bottom: 2px;">${moment.content }</div>
									<div
										style="width: 100%; height: 18px; margin-left: 5px; font-size: 11px; margin-bottom: 8px;">
										<a href="javascript:void(0);"
											onclick="momentsComment(${moment.id });">
											<span style="float:left; margin-top: 2px;"
											id="commentNum${moment.id }">评论(${moment.commentNum })</span></a>&nbsp;&nbsp;&nbsp;&nbsp;
										<div
											style="margin-top: -14px; width: 35px; margin-left: 70px;">
											<a href="javascript:void(0);"
												onclick="momentsThumbUp(${moment.id });"><img
												src="images/zan.png" width="18" height="18"
												style="margin-top: 0px;"></a> <span
												style="margin-top: 3px; float: right;"
												id="thumbUpNum${moment.id }">${moment.thumbUpNum }</span>
										</div>
									</div>
								</li>
							</c:forEach>
						</ul>
					</div>

					<!-- 最新注册用户 -->
					<div class="yc_info_subject fl" style="margin-top: 8px;height: 350px;">
						<div class="yc_is_title">
							<ul style="float: left;">
								<li class="right-2" style="width: 319px;">最新注册用户</li>
							</ul>
						</div>
						<div class="rigbox">
							<!-- 最新注册用户 -->
							<div style="display: block;">
								<ul class="newslist" style="float: left;">
									<c:forEach items="${users}" var="user">
										<li style="height: 60px; margin-bottom: 18px; float: left; margin-right: 20px; margin-left: 12px;">
											<div style="width: 75px;">
											<img alt="${user.chName }" title="${user.chName }" src="expose/article/showPicture/${user.id}"
											style="border-radius: 50%; width: 50px; height: 50px;margin-left: 10px;">
											</div>
											<div style="height: 18px;font-size: 12px;text-align: center;">
												${user.chName } 
											</div>
										</li>
									</c:forEach>
								</ul>
							</div>
						</div>
					</div>
					
					<!-- <script type="text/javascript">
		         		 $('.yc_is_title ul li').click(function(){
								var index = $(this).index();
								$(this).addClass('right-2').siblings().removeClass('right-2');
								$('.rigbox>div:eq('+index+')').css('display','block').siblings().css('display','none');
							});
		          	</script> -->
          		<!-- 最新评论 -->
          		<div class="yc_info_subject fl" style="margin-top: 8px;height: 730px;">
						<div class="yc_is_title" style="border: 1px solid #FF784E;">
							<ul style="float: left;">
								<li style="color: #fff;background:#FF784E;border: 1px solid #FF784E;width: 319px;">最新评论</li>
							</ul>
						</div>
						<div class="rigbox">
								<ul class="newslist" style="height: 600px;">
									<c:forEach items="${newArticels}" var="newArticel">
										<li style="height: 70px; margin-bottom: 10px; float: left; margin-left: 5px;border-bottom: 1px dashed #EEEEEE;">
											<div style="width: 50px;height:70px;float: left;margin-right:10px;margin-bottom: 3px;">
												<img title="${newArticel.chName }" alt="${newArticel.chName }" src="expose/article/showPicture/${newArticel.userId }" style="margin-top:10px;border-radius: 50%; height: 45px; width: 45px;">
											</div>
											<div style="float: left;margin-bottom: 3px;width: 250px;">
												<div style="height: 20px;color: #0099FF;">类别：${newArticel.articleTypeName }</div>
												<div style="height: 20px;">评论于：
												<a href="expose/article/detail/${newArticel.id }">
													<c:choose>
														<c:when test="${fn:length(newArticel.articleTitle) > 25}">${fn:substring(newArticel.articleTitle, 0, 20)}......</c:when>
														<c:otherwise> ${newArticel.articleTitle }</c:otherwise>
													</c:choose>
												</a>
												</div>
												<div style="height: 30px;color: #FF784E;">&nbsp;&nbsp;&nbsp;&nbsp;${newArticel.commentContent }</div>
											</div>
										</li>
									</c:forEach>
								</ul>
						</div>
					</div>
          	
          			<!-- 热门标签 -->
					<div class="yc_info_subject fl mt" style="margin-top: 120px;height: 440px;">
						<div class="yc_is_title" style="width: 318px;border: 1px solid #E9E9E9;">
							<ul style="float: left;background: #2E3E4E;">
								<li style="width: 318px;color: #fff;">热门标签</li>
							</ul>
						</div>
						<div class="rigbox" id="rigbox">
							<ul style="width: 328px;margin-left: -6px;">
								<li style="float: left;font-size: 14px;margin-top: 5px;" id="hot-label">
									<c:forEach items="${articleTypes }" var="articleType">
										<span style="float:left;width:80px;height: 30px;text-align: center;line-height: 30px;">
											<a target="_blank" style="float: left;text-align: center;width:80px;" href="expose/article/byArticleTypeList/${articleType.id}">${articleType.articleTypeName }</a>
										</span>
									</c:forEach>
									<span style="float:left;width:80px;height: 30px;text-align: center;line-height: 30px;">
										<a target="_blank" style="float: left;text-align: center;width:80px;" href="expose/article/byArticleTypeList/1">更多</a>
									</span>
								</li>
							</ul>
						</div>
					</div>
					
					<div class="yc_info_subject fl mt" style="margin-top: -30px;">
						<div class="yc_is_title" id="yc-title" style="width: 318px;border: 1px solid #E9E9E9;">
							<ul style="float: left;">
								<li class="right-3" style="width: 159px;">排行榜</li>
								<li style="width: 159px;">友情链接</li>
							</ul>
						</div>
						<div class="rigbox" id="rigbox">
							<div style="display: block;" class="abc">
								<ul class="newslist">
									<c:forEach items="${userRanks }" var="userRank"
										varStatus="rank">
										<li>
											<c:if test="${rank.index+1 ==1}">
												<div style="margin-left: 8px;height:25px; margin-right: 10px; float: left; text-align: center; width: 25px; background: #E74A2B;color: #fff; font-weight: bold;">${rank.index+1}</div>
											</c:if> 
											<c:if test="${rank.index+1 ==2}">
												<div style="margin-left: 8px; margin-right: 10px; float: left; text-align: center; width: 25px; background: #F19601;color: #fff; font-weight: bold;">${rank.index+1}</div>
											</c:if> 
											<c:if test="${rank.index+1 ==3}">
												<div style="margin-left: 8px; margin-right: 10px; float: left; text-align: center; width: 25px; background: #F3D400;color: #fff; font-weight: bold;">${rank.index+1}</div>
											</c:if> 
											<c:if test="${rank.index+1 >3}">
												<div style="margin-left: 8px; margin-right: 10px; float: left; text-align: center; width: 25px; background: #A2A2A2;color: #fff; font-weight: bold;">${rank.index+1}</div>
											</c:if>
											<div
												style="width: 100px; margin-left: 4px; float: left; font-size: 13px;">${userRank.chName}</div>
											<div
												style="float: left; color: #888888; width: 100px; font-size: 13px;">${userRank.integral}</div>
											<div
												style="float: left;border-radius:40px;margin-left:-20px;
		               		 	<c:if test="${userRank.grade <5}">background:#999999</c:if>
		               		 	<c:if test="${userRank.grade >=5 && userRank.grade <10}">background:#468847</c:if>
		               		 	<c:if test="${userRank.grade >=10 && userRank.grade <15}">background:#F89406</c:if>
		               		 	<c:if test="${userRank.grade >=15 && userRank.grade <25}">background:#FF0000</c:if>
		               		 	<c:if test="${userRank.grade >=25}">background:#189AE5</c:if>
		               		 	;color: #fff;width: 40px;text-align: center;height:22px;line-height:22px;">LV${userRank.grade}</div>
										</li>
									</c:forEach>
								</ul>
							</div>
							<div style="display: none;"  class="abc">
								<ul class="newslist" >
									<c:forEach items="${links }" var="link">
										<c:if test="${link.isVailid ==1 }">
											<li style="margin-left: 8px;"><a target="_blank" href="${link.linkUrl }">${link.linkName }</a></li>
										</c:if>
									</c:forEach>
								</ul>
							</div>
						</div>
					</div>
				</div>
			</div>
					<script type="text/javascript">
			         		 $('#yc-title ul li').click(function(){
								var index = $(this).index();
								$(this).addClass('right-3').siblings().removeClass('right-3');
								$('.abc:eq('+index+')').css('display','block').siblings().css('display','none');
							});
         			 </script>
			<div style="width: 808px; height: 200px; margin-top: 384px;">
				<div
					style="margin-top: -1495px; text-align: center; color: #fff; height: 35px; line-height: 35px; float: left; background: #6CA7D6; width: 808px;">
					<span>
						<h1>热门书籍</h1>
					</span>
				</div>
				<div class="bq" style="margin-top: -1460px;">
					<ul>
						<c:forEach items="${books }" var="book">
							<li style="width: 195px;height:240px;border: 1px solid #D0D6D2;">
								<img alt="" src="user/book/showImgShow?id=${book.id}" title="${book.bookName }" style="margin:1px;height: 200px; width: 190px;">
								<a target="_blank" href="expose/article/byArticleTypeList/${book.id}">${book.bookName }</a>
							</li>
						</c:forEach>
						<!-- <li><a href="expose/article/byArticleTypeList/1">更多&gt;&gt;</a></li> -->
					</ul>
				</div>
			</div>
			
			<div style="width: 808px; height: 200px; margin-top: 1884px;">
				<div
					style="margin-top: -235px; text-align: left; color: #fff; height: 35px; line-height: 35px; float: left; background: #189AE5; width: 808px;">
					<span style="float: left;font-size: 14px;">
						<h3>网站源码</h3>
					</span>
				</div>
				<div class="bq" style="margin-top: -199px;">
					<ul>
						<c:forEach items="${books }" var="book">
							<li style="width: 195px;height:240px;border: 1px solid #D0D6D2;">
								<img alt="" src="user/book/showImgShow?id=${book.id}" style="margin:1px;height: 200px; width: 190px;">
								<a target="_blank" href="expose/article/byArticleTypeList/${book.id}">${book.bookName }</a>
							</li>
						</c:forEach>
						<!-- <li><a href="expose/article/byArticleTypeList/1">更多&gt;&gt;</a></li> -->
					</ul>
				</div>
			</div>
		</div>
	</div>

	<!-- 底部 -->
	<footer class="yc_footer"> <jsp:include page="bottom.jsp"></jsp:include>
	</footer>

</body>
</html>
